package com.fsserver.core.dto;

import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * Refund Request DTO
 *
 * @author fsserver
 */
@Data
public class RefundRequestDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * Order number
     */
    @NotBlank(message = "Order number cannot be empty")
    private String orderNo;

    /**
     * Transaction number
     */
    @NotBlank(message = "Transaction number cannot be empty")
    private String transactionNo;

    /**
     * Refund amount
     */
    @NotNull(message = "Refund amount cannot be empty")
    @DecimalMin(value = "0.01", message = "Refund amount must be greater than 0")
    private BigDecimal amount;

    /**
     * Refund number
     */
    private String refundNo;
    
    /**
     * Total amount of the order
     */
    private BigDecimal totalAmount;

    /**
     * Refund reason
     */
    private String reason;

    /**
     * User IP
     */
    private String userIp;

    /**
     * Extra parameters
     */
    private String extraParams;
} 